<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Common extends MX_Controller {

	
	public function index()
	{
		$this->load->view('common');
	}

	
	function header(){

		$this->load->model('manager/manager_model');

		$user_id = Modules::run('auth/get_user_id');

		$store = $this->manager_model->get_store($user_id);

		$data['store_name'] = $store->nama_toko;
		$data['store_id'] = $store->toko_id;

		if (is_array($this->session->flashdata('message'))){
			$data['message'] = $this->session->flashdata('message');
		}

		return $this->load->view('header',$data, TRUE);

	}

	function footer(){

		$this->load->view('footer');

	}

	function sidebar(){

		$this->load->view('sidebar');

	}


}

/* End of file common.php */